package com.haoshuang.zhouzhoubang.ui.page.test

import android.content.Context
import android.os.Bundle
import android.util.Log
import com.haoshuang.zhouzhoubang.databinding.ActivityTestPageBinding
import com.mufeng.libs.base.BaseVMActivity
import com.mufeng.libs.utils.view.click
import com.mufeng.libs.utils.startPage

/**
 *  测试图片上传
 */
class TestPageActivity : BaseVMActivity<TestPageViewModel, ActivityTestPageBinding>() {

    companion object {
        fun launch(context: Context){
            context.startPage<TestPageActivity>()
        }
    }

    override fun initView(savedInstanceState: Bundle?) {
        binding.apply{
            titleBar.title = "测试图片上传"
            titleBar.leftImageView().click { finish() }
            titleBar.rightTextView().click {
                val singleMedia = uploadSingleView.getSingleMedia()
                val list = uploadListView.getMediaList()
                Log.e("TAG", "singleMedia: ${singleMedia?.url}")
                list.forEach {
                    Log.e("TAG", "getMediaList: ${it.url}")
                }
            }
        }
    }

    override fun initData() {
    }

    override fun startObserve() {
    }

}